﻿using Inovout.Models;
using Inovout.Repositories;
using Inovout.YunYao.Models;
using NHibernate.Criterion;
using System.Collections.Generic;

namespace Inovout.YunYao.Repositories
{
    public class MonitoringElementRepository<TMonitoringElement>
        : DataObjectRepository<TMonitoringElement>, IRepository<TMonitoringElement> where TMonitoringElement : DataObject, IMonitoringElement
    {
        public IList<TMonitoringElement> FindAllBySolutionId(int solutionId)
        {
            return base.FindAll(Expression.Eq("Solution.Id", solutionId));
        }
    }
}
